<?php
$xtpl = new XTemplate($inner_templates."home.testimonial.htm");

$xtpl->assign ("base_url", $base_url);
$page = $_GET['page'];
$limit = 10;
$pagegroup_size = 10;
if (!$page||$page==0){
	$page=1;
}
$offset = ($page-1)*$limit;
//////
/////////////////////////
$sql_c = "SELECT COUNT(*) AS total_msg FROM {$DP}testimonial WHERE id_lang=".$_SESSION['ID_LANG'];
$rs_c = mysql_query($sql_c);
list($numrec)=mysql_fetch_row($rs_c);
//////////////////////////
$title = "";
$rs = $DB->ZenDataList('testimonial','',"status='1' AND id_lang='".$_SESSION['ID_LANG']."'",'id DESC ',$offset.','.$limit);
while($row = mysql_fetch_array($rs)){
    $row['name']=stripslashes($row['name']);
    $row['description']=stripslashes($row['description']);
    $xtpl->assign("list",$row);
    $xtpl->parse("center.list");
}
$pages = pagenavigator($page,$numrec,$limit,$pagegroup_size,"row0",$base_url._LB_MOD_TESTIMONIAL."/");
$xtpl->assign("page",$page);
$xtpl->assign("pages",$pages);
$xtpl->assign("numrec",$numrec);
$xtpl->parse("center.pagination");
$title = _LB_NEWS;
$xtpl_main->assign ("page_title", $title);
//--
include $rootPath.'modules/home/left.support_online.php';
?>
